package top.iforum.common.quartz.callback;

import top.iforum.common.quartz.data.ScheduleJob;

/**
 * All rights Reserved, Designed By www.iforum.top
 *
 * @version V1.0
 * @description: 执行回掉
 * @author: 张娜
 * @copyright: 2019 www.iforum.top Inc. All rights reserved.
 */
public interface QuartzExecuteCallback {

    /**
     * 执行开始
     * @param scheduleJob
     */
    void onStart(ScheduleJob scheduleJob);
    /**
     * 当执行成功
     * @param scheduleJob
     * @param message
     */
    void onSuccess(ScheduleJob scheduleJob,String message);

    /**
     * 执行失败
     * @param scheduleJob
     * @param e
     * @param message
     */
    void onFailure(ScheduleJob scheduleJob,Exception e,String message);
}
